﻿using System.Collections.Generic;
using Core.Library;

namespace DataObject.OrderDetail
{
    public class OrderDetailController
    {
        public static void OrderDetail_Create(OrderDetailObject o)
        {
            OrderDetailDAL.OrderDetail_Create(o);
        }

        public static void OrderDetail_Delete(int orderDetailId)
        {
            OrderDetailDAL.OrderDetail_Delete(orderDetailId);
        }

        public static void OrderDetail_DeleteAll_ByOrderId(int orderId)
        {
            OrderDetailDAL.OrderDetail_DeleteAll_ByOrderId(orderId);
        }

        public static List<OrderDetailObject> OrderDetail_GetListByOrderId(int orderId)
        {
            return ObjectHelper.FillCollection<OrderDetailObject>(OrderDetailDAL.OrderDetail_GetListByOrderId(orderId));
        }
    }
}
